/**
 * 
 */
function general(){
	if(document.getElementById("btnList") != null){
		document.getElementById('btnList').onclick = function(){
//			alert("general");
			location.href="list.jsp";
		}
	}
	if(document.getElementById('btnInput')!=null){
		document.getElementById('btnInput').onclick=function(){
			location.href = 'input.jsp';
		}
		
	}
	if(document.getElementById('btnModify')!=null){
		document.getElementById('btnModify').onclick=function(){
			location.href = 'modify.jsp';
		}
	}
	if(document.getElementById('btnDelete')!=null){
		document.getElementById('btnDelete').onclick=function(){
			location.href = 'delete_result.jsp';
		}
	}
	if(document.getElementById('btnView')!=null){
		document.getElementById('btnView').onclick=function(){
			location.href = 'view.jsp';
		}
	}
}
function goPage(page){
	location.href = 'view.jsp?page='+page;
}
function inputInit(){//input과 관련 모듈
	//alert("inputInit");
	general();
	document.getElementById("btnSave").onclick = function(){
		var f = document.frm;
		if(f.rno.value==""||f.mid.value==""){
			alert("적어~");
		}else{
			f.submit();
		}
	}
}
function listInit(){
	general();
}
function viewInit(){
	general();
}
function modifyInit(){
	general();
	document.getElementById("btnSave").onclick = function(){
		var f = document.frm;
		if(f.rno.value ==""||f.mid.value ==""){
			
			alert("적어");
		}else{
			f.submit();
		}
	}
}
function deleteInit(){
	general();
}